<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h5 class="modal-title">触发条件</h5>
</div>

<div class="main-body" style="height: 500px">

    <div style="display: flex;height: 450px">
        <div style="width:550px">
            <fieldset>
                <legend>编辑公式区</legend>
                <textarea style="height: 304px; width: 479px; margin: 0px;"></textarea>
            </fieldset>

            <div style="display: flex;margin-top: 10px">
                <label>运算符</label>

                <div class="btn-group" role="group" aria-label="..." style="margin-left: 10px">
                    <button type="button" class="btn btn-default btn-sm">(</button>
                    <button type="button" class="btn btn-default btn-sm">)</button>
                </div>
                <label>|</label>
                <div class="btn-group" role="group" aria-label="...">
                    <button type="button" class="btn btn-default btn-sm">与</button>
                    <button type="button" class="btn btn-default btn-sm">或</button>
                </div>
                <label>|</label>

                <div class="btn-group" role="group" aria-label="...">
                    <button type="button" class="btn btn-default btn-sm">></button>
                    <button type="button" class="btn btn-default btn-sm">>=</button>
                    <button type="button" class="btn btn-default btn-sm">=</button>
                    <button type="button" class="btn btn-default btn-sm"><</button>
                    <button type="button" class="btn btn-default btn-sm"><=</button>
                </div>
                <a href="javascript:void(0)" style="margin-left: 10px">公式校验</a>
            </div>
        </div>
        <div style="width:100px">
            <button type="button" class="btn btn-default btn-lg" id="" data-toggle="tooltip" style="margin-top: 150px;margin-left: 20px;">
                <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
            </button>
        </div>
        <div style="width:550px">
            <div style="margin-right: 10px">
                <label>可选参数/报警/状态/台账属性</label>
                <table id="dataTable_condition" data-url="/project/accountManage/condition_data" data-page-list=[]
                       data-striped="true" data-pagination="true" data-page-size="15" data-cache="false">

                </table>
            </div>
        </div>
    </div>

    <div class="modal-footer" style="text-align:center">

        <button type="submit" class="btn btn-primary">确定</button>
    </div>

</div>

<script>

    //table字段
    var dataFormat = [{
        checkbox: true
    },{
        field: 'code',
        title: '编号',
        align: 'center'
    },{
        field: 'type',
        title: '类型',
        align: 'center'
    },{
        field: 'name',
        title: '名称',
        align: 'center'
    }];

    getTableConditon(dataFormat, "dataTable_condition");

    function getTableConditon (dataFormat,id) {
        $("#"+id).bootstrapTable({
            method:"get",
            sidePagination:"server",
            dataType: "json",
            queryParams: function queryParams(params) {   //设置查询参数
                var param = {
                    pageNum: params.offset/params.limit
                };
                $(".search-data").each(function () {
                    var key = $(this).attr("name");
                    var val = $(this).val();
                    if (val){
                        param[key] = val;
                    }
                });
                console.log(param);
                return param;
            },
            columns:dataFormat
        });
    }

    $(".main-body button").click(function () {


    })
//    function chooseInParameter() {
//        $("#modal_condition").modal('hide');  //手动关闭
//    }
</script>